package com.cesgroup.zw.spring.boot.library.echarts.bar.plusOrMinus;

import com.cesgroup.zw.spring.boot.echarts.component.series.Bar;
import com.cesgroup.zw.spring.boot.echarts.model.style.LabelStyle;

/**
 * @author ytj
 * @date 2019/7/8 13:14
 */
@SuppressWarnings("serial")
public class PlusOrMinusBarSeries extends Bar{
    public PlusOrMinusBarSeries(PlusOrMinusBarParam param,String type){
        if("1".equals(type))
            this.demo1(param);
        else if("2".equals(type))
            this.demo2(param);
    }
    public void demo1(PlusOrMinusBarParam param){
        this.setName("等待中");
        this.setType("bar");
        this.setStack("总量");
        this.setLabel(new LabelStyle(){{
            this.setShow(true);
        }});
        this.setData(param.getDataset().get("date1"));
    }
    public void demo2(PlusOrMinusBarParam param){
        this.setName("生产中");
        this.setType("bar");
        this.setStack("总量");
        this.setLabel(new LabelStyle(){{
            this.setShow(true);
        }});
        this.setData(param.getDataset().get("date2"));
    }
}
